fix 'ready for review'/'published' status bug #43
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a fix for an issue reported on slack.
Basically the issue here is that we were just looking at
LanguageCloudFile
object imported: Yes/No?This meant that as we translated the same page on multiple occasions over time the status for old
LanguageCloudFile
objects was changing.This PR attempts to address that by attaching a FK to a
PageRevision
at the point we import theLanguageCloudFile
so we can accurately track whether the changes related to that specificLanguageCloudFile
are live or not. I've also added a less specific fallback status to handle some edge cases. The key one being for historicLanguageCloudFile
objects that don't have a revision attached to them.side issue: I seem to have hit the same issue Karl did over in wagtail/wagtail-localize#549 with
0066_collection_management_permissions
. I followed the advice from wagtail/wagtail-localize#549 (comment) and just dropped it but it would be useful to understand why Django thinks that needs to be applied first when really it doesn't.